# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=nfpm
pkgver=1.3.2
pkgrel=0
pkgdesc="a simple Deb and RPM packager without external dependencies"
url="https://nfpm.goreleaser.com/"
arch="all !mips !mips64"
license="MIT"
makedepends="go"
options="chmod-clean"
source="$pkgname-$pkgver.tar.gz::https://github.com/goreleaser/nfpm/archive/v$pkgver.tar.gz"

export GOPATH="$srcdir/go"

prepare() {
	default_prepare
	mkdir -p bin
}

build() {
	go build -ldflags "-s -w" -v -o bin/ ./...
}

check() {
	go test
}

package() {
	install -Dm0755 bin/nfpm "$pkgdir/usr/bin/nfpm"
}

sha512sums="5f16359aa7a5c43f2a4d66c9658e3ef4468cfbeabd353d99124c3d2651e074da5e17fe9c185d08e3ded4087adb54b221d1dafde71297c3826e1ad6865456352b  nfpm-1.3.2.tar.gz"
